
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

//import net.miginfocom.swing.MigLayout;

import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JPasswordField;

public class Login extends JFrame {

	private JPanel contentPane;
	private JTextField textField;
	private JPasswordField passwordField;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Login frame = new Login();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Login() {
		initialize();
	}
	
	public void initialize(){
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 317, 174);
		this.setResizable(false);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout());
		setContentPane(contentPane);
		
		JPanel buttonPane = new JPanel();
		buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
		getContentPane().add(buttonPane, BorderLayout.SOUTH);
		{
			JButton btnAcceder = new JButton("Iniciar Sesion");
			btnAcceder.setActionCommand("OK");
			buttonPane.add(btnAcceder);
			getRootPane().setDefaultButton(btnAcceder);
		}
		
		JPanel contentPanel = new JPanel();
//		contentPanel.setLayout(new MigLayout("", "[][grow,fill]", "[]20[]"));
		getContentPane().add(contentPanel,BorderLayout.CENTER);
		
		JLabel lblUsuario = new JLabel("Usuario");
		contentPanel.add(lblUsuario, "cell 0 0,alignx trailing");
		
		textField = new JTextField();
		contentPanel.add(textField, "cell 1 0,growx");
		textField.setColumns(10);
		
		JLabel lblContrasea = new JLabel("Contrase\u00F1a");
		contentPanel.add(lblContrasea, "cell 0 1,alignx trailing");
		
		passwordField = new JPasswordField();
		contentPanel.add(passwordField, "cell 1 1,growx");
		
	}

}
